<?php echo $this->render('mensaje.phtml');?>

<h2><?php echo $this->escape($this->subtitle); ?></h2>

<div class="menu-admin">
	<a href="<?php echo $this->baseUrl; ?>/admin/menus/agregar">Agregar</a>
</div>
<br>

<table>
	<tr>
		<th><a href="<?php echo $this->baseUrl; ?>/admin/menus/index/orden/id/asc/<?php echo !$this->orden_asc;?>">id</a></th>
		<th><a href="<?php echo $this->baseUrl; ?>/admin/menus/index/orden/nombre/asc/<?php echo !$this->orden_asc;?>">Nombre</a></th>
		<th><a title="Privado" href="<?php echo $this->baseUrl; ?>/admin/menus/index/orden/privado/asc/<?php echo !$this->orden_asc;?>">Priv</a></th>
		<th><a title="Estado" href="<?php echo $this->baseUrl; ?>/admin/menus/index/orden/estado/asc/<?php echo !$this->orden_asc;?>">Est</a></th>
		<th><a title="Posición" href="<?php echo $this->baseUrl; ?>/admin/menus/index/orden/posicion/asc/<?php echo !$this->orden_asc;?>">Pos</a></th>
        <th colspan="4">Acciones</th>
    </tr>
    <?php
    foreach( $this->menus as $menu ) : ?>
	    <tr>
			<td><?php echo $this->escape($menu->id);?></td>
			<td nowrap="nowrap"><?php echo $this->escape($menu->nombre);?></td>
			<td align="center">
				<img border="0"	src="<?php echo $this->baseUrl?>/html/images/estado_<?php echo $menu->privado; ?>.png" />
			</td>
			<td align="center">
				<img border="0" src="<?php echo $this->baseUrl ?>/html/images/estado_<?php echo $menu->estado; ?>.png" />
			</td>
			<td><?php echo $this->escape($menu->posicion);?></td>
            <td nowrap="nowrap">
				<div class="menu-admin">
					<a title="Modificación" href="<?php echo $this->baseUrl; ?>/admin/menus/modificar/id/<?php echo $menu->id;?>">Mod</a>
					<a title="Eliminar" href="<?php echo $this->baseUrl; ?>/admin/menus/eliminar/id/<?php echo $menu->id;?>">Eli</a>
					<a href="<?php echo $this->baseUrl; ?>/admin/items/editar/id/<?php echo $menu->id;?>">Agregar Items</a>
				</div>
			</td>
		</tr>
    <?php endforeach; ?>
</table>
<br>
<div class="menu-admin">
	<a href="<?php echo $this->baseUrl; ?>/admin/menus/agregar">Agregar</a>
</div>
<br>